﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/TempAdmin.master" AutoEventWireup="true" CodeFile="ServiceManage.aspx.cs" Inherits="admin_ServiceManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentRight" Runat="Server">
 <div>    
        <img src="../img/pixel_trans.gif" height="10px" />
        <form id="fomr1" runat="server">
            <div align="center">
                 <asp:Label ID="lblHeader" runat="server" Text="Danh sách dịch vụ "
                        ForeColor="#003300" Font-Size="Large" Font-Bold="True"></asp:Label>
                 <img src="../img/pixel_trans.gif" height="10px" /><br />
                 <asp:Label ID ="lblTextMessage" runat="server" ForeColor="Black"></asp:Label>
                 <img src="../img/pixel_trans.gif" height="10px" />
                 <asp:GridView ID="gvService" DataKeyNames="serviceID" DataSourceID="odsService" 
                runat="server" AutoGenerateColumns="false" 
                BorderColor="#000066" ForeColor="#003300" onrowdeleting="gvService_RowDeleting" 
                     onselectedindexchanged="gvService_SelectedIndexChanged" >
                <Columns>
                    <asp:BoundField HeaderStyle-HorizontalAlign="Center" DataField="ServiceID" ReadOnly="true" HeaderText ="Mã" InsertVisible="false" >
                        <ItemStyle HorizontalAlign="Center" ForeColor="Gray" />
                        <ControlStyle BackColor="Black"></ControlStyle>
                    </asp:BoundField>
                    <asp:BoundField HeaderStyle-HorizontalAlign="Center" DataField="ServiceName" ReadOnly ="true" HeaderText="Tên Dịch Vụ" InsertVisible="false">
                        <ItemStyle HorizontalAlign="Center" ForeColor="Gray" />
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemStyle HorizontalAlign ="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbUpdate" runat="server" style="color:Blue; font-family: tahoma; text-decoration: none" CommandName="select">&nbsp;&nbsp;&nbsp;&nbsp;Chi 
                            tiết [&gt;&gt;]</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemStyle HorizontalAlign ="Center" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lbDelete" runat="server" style=" color:Blue; font-family:tahoma; text-decoration: none" OnClientClick='return confirm("Bạn có chắc chắn muốn xóa sản phẩm này không ?")' CommandName="delete">&nbsp;&nbsp;&nbsp;&nbsp;Xóa 
                            [x]</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>   
            <asp:ObjectDataSource ID="odsService" runat="server" 
                    DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" 
                    SelectMethod="GetAllService" TypeName="BonSaiTableAdapters.ServiceTableAdapter">
                    <DeleteParameters>
                        <asp:Parameter Name="Original_ServiceID" Type="Int32" />
                    </DeleteParameters>
             </asp:ObjectDataSource>
            </div>
        </form>        
    </div>   
</asp:Content>

